import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../views/layout/LayoutView.vue'
import Cart from "../views/cart/CartView.vue"
import Home from "../views/home/HomeView.vue"
import Order from "../views/order/OrderView.vue"
import My from "../views/my/MyView.vue"
import Shop from "../views/shop/Shop.vue"

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            redirect: '/home',
            component: Layout,
            children: [
                {
                    path: 'home',
                    component: Home
                },
                {
                    path: 'cart',
                    component: Cart
                },
                {
                    path: 'my',
                    component: My
                },
                {
                    path: 'order',
                    component: Order
                },
            ]
        },
        {
            path: '/shop',
            component: Shop
        },

    ]
})

export default router